function uploadImg(){
    var imageInputId = document.getElementById("chooseImg");
    var imageURL = imageInputId.value;
    imageURL = imageURL.substring(imageURL.lastIndexOf("\\") + 1);
    //imageURL进一步处理
    imageURL = "/img/" + imageURL;
    $.ajaxFileUpload({
        url:"/CooperateWeb/upload/uploadImg",
        secureuri:false,
        fileElementId:imageInputId,
        dataType:'json',
        success:function(data, status){
            if(data){
                showImg(imageURL);
            }else{
                $.messager.alert("提示",data.result,"error");
            }
        }
    });

}

function showImg(imageURL){
    var imagediv = document.getElementById("imgMap");
    var img = document.createElement("img");
    img.setAttribute("src",imageURL);
    img.setAttribute("width", "417");
    img.setAttribute("height", "264");
    img.setAttribute("border","0");
    img.setAttribute("name", "test");
    img.setAttribute("usemap","#map");
    img.setAttribute("ref", "imageMaps");
    var map = document.createElement("map");
    map.setAttribute("name","Map");
    imagediv.appendChild(img);
    imagediv.appendChild(map);
    $('#imgMap').imageMaps();
}